package com.hc.acoustics.bean.contact;

import androidx.annotation.IntDef;

import com.hc.acoustics.R;
import com.hc.acoustics.base.BaseActivity;
import com.hc.acoustics.ui.activity.FormulaTypeActivity;
import com.hc.acoustics.ui.activity.WebActivity;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Arrays;
import java.util.List;

/**
 *
 */
public class MainType {
    @IntDef({MainType.State.Main_1, MainType.State.Main_2, MainType.State.Main_3
            , MainType.State.Main_4, MainType.State.Main_5, MainType.State.Main_6
            , MainType.State.Main_7, MainType.State.Main_8, MainType.State.Main_9})
    @Retention(RetentionPolicy.SOURCE)
    public @interface State {
        /**
         * 声学公开课
         */
        int Main_1 = 1;
        /**
         * 声学
         */
        int Main_2 = 2;
        /**
         * 电子学
         */
        int Main_3 = 3;
        /**
         * 限幅器
         */
        int Main_4 = 4;
        /**
         * 超低音阵列
         */
        int Main_5 = 5;
        /**
         * 系统设计
         */
        int Main_6 = 6;
        /**
         * 声学增益
         */
        int Main_7 = 7;
        /**
         * 参考
         */
        int Main_8 = 8;
        /**
         * 版本更新
         */
        int Main_9 = 9;
    }

    public static List<Integer> getMainDrawable() {
        return Arrays.asList(
                R.drawable.ic_main_1, R.drawable.ic_main_2, R.drawable.ic_main_3
                , R.drawable.ic_main_4, R.drawable.ic_main_5, R.drawable.ic_main_6
                , R.drawable.ic_main_7, R.drawable.ic_main_8, R.drawable.ic_main_9
        );
    }


    public static String getTitleName(@State int state) {
        switch (state) {
            default:
            case State.Main_1:
                return "声学公开课";
            case State.Main_2:
                return "声学";
            case State.Main_3:
                return "电子学";
            case State.Main_4:
                return "限幅器";
            case State.Main_5:
                return "超低音阵列";
            case State.Main_6:
                return "系统设计";
            case State.Main_7:
                return "音乐/录音";
            case State.Main_8:
                return "参考";
            case State.Main_9:
                return "版本更新";
        }
    }
}
